ci: Add `dist-then-build` target to catch missing `EXTRA_DIST`
authorColin Walters <walters@verbum.org>
Thu, 25 Oct 2018 15:15:51 +0000 (15:15 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 25 Oct 2018 16:24:10 +0000 (16:24 +0000)
I personally am very opposed to the entire idea of `make distcheck`;
I think source code should canonically be *git* and not tarballs.
See e.g. https://github.com/cgwalters/git-evtag for some
rationale.

But anyways we are uploading classic tarballs since today that
what Debian/Fedora/etc consume sadly, so we need to test it.

We explicitly skip `make distcheck` since we don't want to rerun
the test suite.

Closes: #1766
Approved by: jlebon

.papr.yml
Makefile.am

index f7044e5d3794ca0b203595c02a43630f3e51c93e..798435806b9a37337a0be8234abcbfec308f751e 100644 (file)
--- a/.papr.yml
+++ b/.papr.yml
@@ -47,6 +47,7 @@ tests:
   - ci/ci-commitmessage-submodules.sh
   - ci/build-check.sh
   - ci/ci-release-build.sh
+  - make dist-then-build
 
 artifacts:
   - test-suite.log
index 85542edbd17d7fe870ae64232eab43624dbc3b7b..4850cdddb3790f7c97ecdda7831d184edf144a60 100644 (file)
@@ -155,4 +155,14 @@ release-tarball-embedded:
        mv ostree-embeddeps-$${GITVERSION}.tar{.tmp,}; \
        gzip -f ostree-embeddeps-$${GITVERSION}.tar 
 
+# `make dist` + `make`; explicitly not the other
+# parts of distcheck like `make uninstall` since
+# we don't care about that.
+dist-then-build: dist
+       rm $(distdir) -rf && tar -xf $(distdir).tar.xz
+       cd $(distdir) && mkdir _build && cd _build && \
+         ../configure --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc && \
+         $(MAKE) && make install DESTDIR=$$(pwd)/_install && \
+       rm -rf $(distdir)
+
 -include $(top_srcdir)/git.mk